﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using KPIS.GERP.SERVICE.Model;
using KPIS.GERP.WEB.GFMS.Class;

namespace KPIS.GERP.WEB.GFMS.Class
{
    public static class GimsServiceData
    {
        public static hrm_ps_employees CurrentEmployeeOld
        {
            get
            {
                return new hrm_ps_employees();
                //TempService.TempServiceClient tempServiceClient = new TempService.TempServiceClient();
                //return tempServiceClient.GetEmployeeByCitizen(Class.GimsMembership.User.Employee.Citizen);
            }
        }

        public static int CurrentEmployeeOldSeq
        {
            get
            {
                return 1;
                //TempService.TempServiceClient tempServiceClient = new TempService.TempServiceClient();
                //return tempServiceClient.GetEmployeeByCitizen(Class.GimsMembership.User.Employee.Citizen).emp_sec_seq ?? -1;
            }
        }

        public static int CountUnReadMessage()
        {
            return new KPIS.GERP.WEB.GFMS.MessageService.MessageServiceClient().CountUnReadMessage(GimsMembership.CurrentUserId);
        }

        public static int CountUnWarnMessage()
        {
            return new KPIS.GERP.WEB.GFMS.MessageService.MessageServiceClient().CountUnWarnMessage(GimsMembership.CurrentUserId);
        }

        public static void WarnMessage()
        {
            new KPIS.GERP.WEB.GFMS.MessageService.MessageServiceClient().WarnMessagesAsync(GimsMembership.CurrentUserId);
        }

        public static int CountUnReadTaskMessage()
        {
            return 0; //new KPIS.GERP.WEB.GFMS.TempService.TempServiceClient().GetMessageUnreadCount(CurrentEmployeeOldSeq.ToString());
        }

        public static int CountUnWarnTaskMessage()
        {
            return 0; //new KPIS.GERP.WEB.GFMS.TempService.TempServiceClient().GetMessageUnwarnCount(CurrentEmployeeOldSeq);
        }
    }
}
